Who purchased Joseph, the Ishmaelites or the Midianites?

Question
Who purchased Joseph, the Ishmaelites or the Midianites?
Answer
Genesis 37:28 So when the Midianite merchants came by, his brothers pulled Joseph up out of the cistern and sold him for twenty shekels of silver to the Ishmaelites, who took him to Egypt.

Genesis 37:36 Meanwhile, the Midianites sold Joseph in Egypt to Potiphar, one of Pharaoh's officials, the captain of the guard.

Genesis 39:1 Now Joseph had been taken down to Egypt. Potiphar, an Egyptian who was one of Pharaoh's officials, the captain of the guard, bought him from the Ishmaelites who had taken him there.
The Ishmaelites and Midianites are not two distinctively different groups of people. In Judges 8:22-28 both groups are used interchangeably (as they were by Moses above):
The Israelites said to Gideon, "Rule over us you, your son and your grandson because you have saved us out of the hand of Midian." But Gideon told them, "I will not rule over you, nor will my son rule over you. The LORD will rule over you." And he said, "I do have one request, that each of you give me an earring from your share of the plunder." (It was the custom of the Ishmaelites to wear gold earrings.) They answered, "We'll be glad to give them." So they spread out a garment, and each man threw a ring from his plunder onto it. The weight of the gold rings he asked for came to seventeen hundred shekels, not counting the ornaments, the pendants and the purple garments worn by the kings of Midian or the chains that were on their camels' necks. Gideon made the gold into an ephod, which he placed in Ophrah, his town. All Israel prostituted themselves by worshiping it there, and it became a snare to Gideon and his family. Thus Midian was subdued before the Israelites and did not raise its head again. During Gideon's lifetime, the land enjoyed peace forty years.
This repetition is consistent with the Ancient Near East style of writing.

Ishmael was born to Hagar - Sarah's Egyptian servant (Gen. 16:1-6). Because of God's covenant with Abraham, Ishmael was blessed with many descendants. He had twelve sons and was the father to the nomadic tribes in the north (Gen. 25:12-18). Scripture does not mention an Ishmaelite "king," only princes. And there is no mention of a national boundary. Therefore, anyone from that area could be called an Ishmaelite.

Median was born of Keturah, Abraham's concubine after Sarah's death (Gen. 25:2-4). Median descendants had some kings (Num. 31:8) and resided near Moab. Ishmaelite who resided with the Midianites were considered Midianites.

There is no contradiction as these two groups are a nation within a nation and can be described as the same people with the same father - Abraham.

Answer by Dr. Joseph R. Nally, Jr.

Dr. Joseph R. Nally, Jr., D.D., M.Div. is the Theological Editor at Third Millennium Ministries (Thirdmill).